package com.cwiyc.orderonlineback.controller;

import com.cwiyc.orderonlineback.common.Result;
import com.cwiyc.orderonlineback.entity.Feedback;
import com.cwiyc.orderonlineback.mapper.FeedbackMapper;
import com.cwiyc.orderonlineback.service.FeedbackServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping
public class FeedbackController {

    @Resource
    FeedbackMapper feedbackMapper;

    @Autowired
    private FeedbackServiceImpl feedbackService;

    @PostMapping("/feedback")
    public Result<?> info(@RequestBody Feedback feedback) {
        return feedbackService.feedb(feedback);
    }
}